home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / futils / futils~1 / src / misc1s.zoo / misc1 / find-3.2 / Makefile < prev    next >
Encoding:
Makefile  |  1991-11-04  |  5.2 KB  |  147 lines

  1. # Master Makefile for GNU find, xargs, and locate.
  2. # Copyright (C) 1987, 1990-1991 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. SHELL = d:/gnu/bin/bash.ttp
  19.  
  20. #### Start of system configuration section. ####
  21.  
  22. srcdir = .
  23.  
  24.  
  25. CC = cc
  26. AR = ar
  27. # Set RANLIB = echo if your system doesn't have or need ranlib.
  28. RANLIB = echo
  29. # Use cp if you don't have install.
  30. INSTALL = install
  31. INSTALLDATA = install
  32.  
  33. # Things you might add to DEFS:
  34. # -DCACHE_IDS        If you want find -nouser and -nogroup to make
  35. #            tables of used UIDs and GIDs at startup
  36. #            instead of using getpwuid or getgrgid when
  37. #            needed.  Speeds up -nouser and -nogroup unless
  38. #            you are running NIS or Hesiod, which make
  39. #            password and group calls very expensive. 
  40. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  41. # -DPOSIX        If you have POSIX.1 headers and libraries.
  42. #            Also need to define -DDIRENT.
  43. # -DUSG            If you have System V/ANSI C string headers and
  44. #            functions, and ndir.h. 
  45. # -DDIRENT        If you have dirent.h.
  46. # -DSYSNDIR        Old Xenix systems (selects sys/ndir.h).
  47. # -DVOID_CLOSEDIR    If your closedir function returns void, not int.
  48. # -DMAJOR_IN_MKDEV    If major, minor, makedev are defined in sys/mkdev.h.
  49. # -DCHAR_UNSIGNED    If type `char' is unsigned.
  50. # -DLIMITS_MISSING    If you lack limits.h (uses sys/param.h instead; BSD).
  51. # -DST_BLOCKS_MISSING    If your `struct stat' lacks st_blocks and st_blksize.
  52. # -DVPRINTF_MISSING    If you lack vprintf function (but have _doprnt).
  53. # -DDOPRNT_MISSING    If you lack _doprnt function.  Also need to define
  54. #            -DVPRINTF_MISSING.
  55. # -DTM_ZONE_MISSING    If you lack tm_zone in struct tm; instead
  56. #            use tm_isdst and tzname.
  57. # -DTZNAME_MISSING    If you lack tm_zone and tzname; instead use
  58. #            tm_isdst and timezone.  Also need to define
  59. #            TM_ZONE_MISSING.
  60. # Define zero or one of the following:
  61. # If no FS_* is defined, -fstype treats every filesystem as type "unknown".
  62. # -DFS_MNTENT        If you use 4.3BSD getmntent to get filesystem type.
  63. # -DFS_GETMNT        If you use Ultrix getmnt to get filesystem type.
  64. # -DFS_STATFS        If you use 4.4BSD statfs to get filesystem type.
  65. # -DFS_USG_STATFS    If you use SVR3.2 statfs to get filesystem type.
  66. # -DFS_AIX_STATFS    If you use AIX3 statfs to get filesystem type.
  67. # -DFS_STATVFS        If you use SVR4 statvfs to get filesystem type.
  68.  
  69. DEFS = -DSTDC_HEADERS -DDIRENT
  70.  
  71. CDEBUG = -g -O
  72. CFLAGS = $(CDEBUG) -I. -I../lib -I$(srcdir)/lib $(DEFS)
  73. LDFLAGS = -g
  74. LIBS = 
  75.  
  76. prefix = /usr/local
  77.  
  78. # Where to install `find' and `locate'.
  79. bindir = $(prefix)/gnubin
  80.  
  81. # Where to install programs to create the `locate' database.
  82. libdir = $(prefix)/lib/locate
  83.  
  84. # Where to install the `locate' database.
  85. datadir = $(prefix)/lib/locate
  86.  
  87. # Name of the `locate' database file.
  88. FCODES = $(datadir)/find.codes
  89.  
  90. # Where to install manual pages.
  91. mandir = $(prefix)/man/man1
  92. # Extension (not including `.') for the installed manual page filenames.
  93. manext = 1
  94.  
  95. #### End of system configuration section. ####
  96.  
  97. # Arguments to pass to subdirectory makes.
  98. MDEFINES = bindir='$(bindir)' libdir='$(libdir)' datadir='$(datadir)' \
  99. mandir='$(mandir)' manext='$(manext)' FCODES='$(FCODES)' INSTALL='$(INSTALL)' \
  100. INSTALLDATA='$(INSTALLDATA)' AR='$(AR)' RANLIB='$(RANLIB)' \
  101. CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' CC='$(CC)'
  102.  
  103. DISTFILES = COPYING COPYING.LIB ChangeLog Makefile.in README configure
  104.  
  105. # Subdirectories to run make in for the primary targets.
  106. SUBDIRS = lib find xargs locate man
  107.  
  108. all:
  109.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  110. .PHONY: all
  111.  
  112. install:
  113.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  114. .PHONY: install
  115.  
  116. tags:
  117.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  118. .PHONY: tags
  119.  
  120. TAGS:
  121.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  122. .PHONY: TAGS
  123.  
  124. clean:
  125.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  126. .PHONY: clean
  127.  
  128. distclean:
  129.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  130.     rm -f Makefile config.status
  131. .PHONY: distclean
  132.  
  133. realclean:
  134.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  135.     rm -f Makefile config.status
  136. .PHONY: realclean
  137.  
  138. dist:
  139.     echo find-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q find/version.c` > .fname
  140.     rm -rf `cat .fname`
  141.     mkdir `cat .fname`
  142.     ln $(DISTFILES) `cat .fname`
  143.     for dir in $(SUBDIRS); do mkdir `cat .fname`/$$dir; cd $$dir; $(MAKE) $@; cd ..; done
  144.     tar chZf `cat .fname`.tar.Z `cat .fname`
  145.     rm -rf `cat .fname` .fname
  146. .PHONY: dist
  147.